package com.xoa.service.crm;

import com.xoa.model.crm.Order;
import com.xoa.util.ToJson;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

import java.util.List;
import java.util.Map;

/**
 * Created by qiyang on 2019/6/3.
 */
public interface OrderService {

    //查询所有  分页  查询
    public List<Order> findAll(Integer page, Integer pageSize, Boolean useFlag, Map map);

    /**
     * 添加订单
     * @param order
     * @return
     */
    int  addOrder(Order order);

    /**
     * 删除订单
     */
    int deleteByPrimaryKey(Integer orderId);

    /**
     * 编辑回显订单数据
     */
    Order selectByPrimaryKey(Integer orderId);

    /**
     * 编辑订单
     */
    int updateByPrimaryKey(Order order);
    /*
 *   导出
 * */
    ToJson<Order> orderExport(HttpServletRequest request, HttpServletResponse response);
    /*
   * 导入
   * */
    ToJson orderImport(HttpServletRequest request, MultipartFile file) ;

}
